<template>
	<view class="col padding">
		<view class="row-between-center">
			<view class="logo"></view>
			<view class="update-time">数据截至时间·2023-9-10</view>
		</view>
		
		<view class="row">
			<image src="/static/images/search.svg" class="search-icon"></image>
			<u-input border="bottom" placeholder="输入搜索内容" class="search-text"></u-input>
		</view>
	
			<view class="bottom row-between-center">
				<view class="item col-center"  style="color: #FE794A ;">
					<image src="/static/images/hot.svg" class="item-icon"></image>
					<view class="item-text">人气榜</view>
				</view>
				
				<view class="item" style="color: #FFBF6B  ;">
					<image src="/static/images/hot.svg" class="item-icon"></image>
					<view class="item-text">打赏榜</view>
				</view>
				
				<view class="item"  style="color: #93D2F3  ;">
					<image src="/static/images/hot.svg" class="item-icon"></image>
					<view class="item-text">新作榜</view>
				</view>
			</view>
	</view>
</template>

<script>
	import {searchCate,searchTop,searchKeyword} from '@/api/change/index.js'
	export default {
		name: 'search',
		data() {
			return {
				keyword:'',
				page:1,
				pageSize:10,
				keyList:[]
			}
		},
		onLoad() {
			this.getCate()
		},
		
		methods: {
			clickTag(item){
				uni.navigateTo({
					url:'/pages/search/top?name='+item.name+'&type=quick'
				})
			},
			clickParent() {
				console.log('onShowonShowonShow')
				this.getCate()
			},
			goTop(name){
		
				uni.navigateTo({
					url:'/pages/search/top?name='+name+'&type=top'
				})
			},
			getCate(){
				searchCate().then(res=>{
					this.keyList = res.data
				})
			},
		
			getKeyword(){
				searchKeyword({keyword:this.keyword,page:this.page,pageSize:this.pageSize}).then(res=>{
					
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.padding{
		position: relative;
	}
	.logo{
		width: 80rpx;
		height: 80rpx;
		background-color: red;
	}
	.update-time{
		color: rgba(154, 154, 154, 1);
		font-size: 32rpx;
		text-align: right;
		font-family: PMZDBiaoTi-regular;
	}
	.search-icon{
		width: 60rpx;
		height: 60rpx;
	}
	.search-text{
		font-size: 40rpx;
	}
	.item{
		width: 220rpx;
		height: 400rpx;
		border-radius: 20rpx;
		background-color: rgba(254, 121, 74, 1);
		color: rgba(16, 16, 16, 1);
		font-size: 28rpx;
		text-align: center;
		font-family: Arial;
		border: 10rpx solid rgba(255, 255, 255, 1);
		.item-icon{
			width: 100rpx;
			height: 100rpx;
		}
		.item-text{
			margin-top: 100rpx;
			font-size: 40rpx;
			color: white;
		}
	}
	.bottom{
		width: calc(100% - 40rpx);
		position: fixed;
		bottom: 150rpx;
	}
</style>
